
/*
 *    MCreator note: This file will be REGENERATED on each build.
 */
package net.minecrea.electric.init;

import net.minecrea.electric.item.MachineWorldItem;
import net.minecrea.electric.item.ElectricWaterItem;
import net.minecrea.electric.item.ElectricSwordItem;
import net.minecrea.electric.item.ElectricIngotItem;
import net.minecrea.electric.item.ElectricArmorItem;
import net.minecrea.electric.ElectricMod;

import net.minecraftforge.registries.RegistryObject;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.DeferredRegister;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.BlockItem;

public class ElectricModItems {
	public static final DeferredRegister<Item> REGISTRY = DeferredRegister.create(ForgeRegistries.ITEMS, ElectricMod.MODID);
	public static final RegistryObject<Item> ELECTRIC_BLOCK = block(ElectricModBlocks.ELECTRIC_BLOCK, ElectricModTabs.TAB_MINEELEC_TAB);
	public static final RegistryObject<Item> ELECTRIC_INGOT = REGISTRY.register("electric_ingot", () -> new ElectricIngotItem());
	public static final RegistryObject<Item> ELECTRIC_ORE = block(ElectricModBlocks.ELECTRIC_ORE, ElectricModTabs.TAB_MINEELEC_TAB);
	public static final RegistryObject<Item> ELECTRIC_ARMOR_HELMET = REGISTRY.register("electric_armor_helmet", () -> new ElectricArmorItem.Helmet());
	public static final RegistryObject<Item> ELECTRIC_ARMOR_CHESTPLATE = REGISTRY.register("electric_armor_chestplate",
			() -> new ElectricArmorItem.Chestplate());
	public static final RegistryObject<Item> ELECTRIC_ARMOR_LEGGINGS = REGISTRY.register("electric_armor_leggings",
			() -> new ElectricArmorItem.Leggings());
	public static final RegistryObject<Item> ELECTRIC_ARMOR_BOOTS = REGISTRY.register("electric_armor_boots", () -> new ElectricArmorItem.Boots());
	public static final RegistryObject<Item> ELECTRIC_WATER_BUCKET = REGISTRY.register("electric_water_bucket", () -> new ElectricWaterItem());
	public static final RegistryObject<Item> MACHINE_WORLD = REGISTRY.register("machine_world", () -> new MachineWorldItem());
	public static final RegistryObject<Item> ELECTRIC_SWORD = REGISTRY.register("electric_sword", () -> new ElectricSwordItem());

	private static RegistryObject<Item> block(RegistryObject<Block> block, CreativeModeTab tab) {
		return REGISTRY.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties().tab(tab)));
	}
}
